[gd_scene load_steps=10 format=2]

[ext_resource path="res://assets/space_env.tres" type="Environment" id=1]
[ext_resource path="res://camera.tscn" type="PackedScene" id=2]
[ext_resource path="res://planet.gd" type="Script" id=3]
[ext_resource path="res://resources/planets/planet/planet.tres" type="Material" id=4]
[ext_resource path="res://assets/sun.png" type="Texture" id=5]
[ext_resource path="res://resources/planets/planet/newplanet.obj" type="ArrayMesh" id=6]
[ext_resource path="res://resources/planets/planet_2/planet.tres" type="Material" id=7]
[ext_resource path="res://gui.tscn" type="PackedScene" id=8]
[ext_resource path="res://Sun.gd" type="Script" id=9]

[node name="Spatial" type="Spatial"]

[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = ExtResource( 1 )

[node name="Sun" type="Spatial" parent="."]
script = ExtResource( 9 )

[node name="planet1" type="Spatial" parent="Sun"]
script = ExtResource( 3 )
semimajor_axis = 50000
semiminor_axis = 20000
angle_of_apoapsis = 78
xtilt = 15
ytilt = 5
color = Color( 1, 0, 1, 1 )

[node name="planet1" type="MeshInstance" parent="Sun/planet1"]
mesh = ExtResource( 6 )
material/0 = ExtResource( 7 )

[node name="ImmediateGeometry" type="ImmediateGeometry" parent="Sun/planet1"]

[node name="planet2" type="Spatial" parent="Sun"]
script = ExtResource( 3 )
semiminor_axis = 80000
color = Color( 0, 1, 1, 1 )

[node name="planet2" type="MeshInstance" parent="Sun/planet2"]
mesh = ExtResource( 6 )
material/0 = ExtResource( 4 )

[node name="ImmediateGeometry" type="ImmediateGeometry" parent="Sun/planet2"]

[node name="Sun" type="Spatial" parent="Sun"]

[node name="Sun" type="Sprite3D" parent="Sun/Sun"]
transform = Transform( 1400, 0, 0, 0, 1400, 0, 0, 0, 1400, 0, 0, 0 )
billboard = 1
texture = ExtResource( 5 )

[node name="OmniLight" type="OmniLight" parent="Sun/Sun"]
light_energy = 3.0
omni_range = 500000.0
omni_attenuation = 4.28709

[node name="Control" parent="." instance=ExtResource( 8 )]

[node name="camera" parent="." instance=ExtResource( 2 )]
[connection signal="update_orbits" from="Sun" to="Control" method="_on_Sun_update_orbits"]
[connection signal="camera_change" from="Control" to="camera" method="_on_Control_camera_change"]
